import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
import moment from 'moment'
Vue.prototype.$moment = moment
import { 
  Icon, Col, Row, Swipe, SwipeItem, Lazyload, Search, Tab, Tabs, Popup, Field, Button, NavBar, Dialog, Cell, 
  CellGroup, RadioGroup, Radio, Stepper, List, PullRefresh, Divider, CouponCell, CouponList, AddressList,AddressEdit,
  Checkbox, CheckboxGroup,SubmitBar, Area 
} from 'vant'

import './assets/font/iconfont.css'  //引进字体图标
import Router from 'vue-router'

Vue.config.productionTip = false

Vue.use(Icon)
   .use(Search)
   .use(Col)
   .use(Row)
   .use(Button)
   .use(Swipe)
   .use(SwipeItem)
   .use(Lazyload)
   .use(Tab)
   .use(Tabs)
   .use(Popup)
   .use(Field)
   .use(NavBar)
   .use(Dialog)
   .use(Cell)
   .use(CellGroup)
   .use(RadioGroup)
   .use(Radio)
   .use(Stepper)
   .use(List)
   .use(PullRefresh)
   .use(Divider)
   .use(CouponCell)
   .use(CouponList)
   .use(AddressList)
   .use(AddressEdit)
   .use(Checkbox)
   .use(CheckboxGroup)
   .use(SubmitBar)
   .use(Area)
;

const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error)
}
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
